// API 配置
export const API_CONFIG = {
  BASE_URL: 'https://fast.huixiangwuyou.com',
  ENDPOINTS: {
    CREATE_COMMENT: '/comments/create',
    LIST_COMMENTS: '/comments/list',
    DELETE_COMMENT: '/comments/delete', // 如果支持的话
  },
  HEADERS: {
    'Content-Type': 'application/json',
  },
}

// 获取完整的 API URL
export const getApiUrl = (endpoint: string) => {
  return `${API_CONFIG.BASE_URL}${endpoint}`
}

// API 请求配置
export const API_REQUESTS = {
  CREATE_COMMENT: {
    url: getApiUrl(API_CONFIG.ENDPOINTS.CREATE_COMMENT),
    method: 'POST',
    headers: API_CONFIG.HEADERS,
  },
  LIST_COMMENTS: {
    url: getApiUrl(API_CONFIG.ENDPOINTS.LIST_COMMENTS),
    method: 'POST',
    headers: API_CONFIG.HEADERS,
  },
  DELETE_COMMENT: (id: string) => ({
    url: getApiUrl(`${API_CONFIG.ENDPOINTS.DELETE_COMMENT}/${id}`),
    method: 'DELETE',
    headers: API_CONFIG.HEADERS,
  }),
} 